/*
 * Copyright (c) Huawei Technologies Co., Ltd. 2022-2022. All rights reserved.
 * Description: 性能评估器相关头文件
 * Author: qingjicheng
 * Create: 2022-8-1
 */

#ifndef CONNECTED_SUBGRAPH_FACTORY_H
#define CONNECTED_SUBGRAPH_FACTORY_H
#include <vector>
#include "graph_common_def.h"
#include "topo_detect.h"
#include "connected_subgraph/connected_subgraph.h"

namespace HcclEvaluator {

class ConnectedSubgraphFactory {
public:
    explicit ConnectedSubgraphFactory();
    virtual ~ConnectedSubgraphFactory();
    HcclResult CreateSubgraphs(AdjacencyMatrix<> &matrix, std::vector<std::unique_ptr<ConnectedSubgraph>> &subgraphs);
private:
    std::unique_ptr<ConnectedSubgraph> CreateSubgraphByMatrix(AdjacencyMatrix<> &&matrix);
    TopoDetect detector_;
};
}
#endif